Webfetch
Webfetch An automated process of retrieving information from a website. Webfetch allows for seamless integration with any content management system, capable of publishing content to a URL that is accessible to PostUp. allows for seamless integration with any content management system, capable of publishing content to a URL accessible to PostUp. The common mailings that leverage Webfetch include recurring newsletters, news alerts and ongoing messages. Webfetch retrieves the content at the time of message assembly and caches it locally.
PostUp will then:
- Retrieve the content
- Populate any available mailing tags with recipient data
- Assemble and send the message
You may make multiple Webfetch calls within a single message.
Note: Your account settings determine your level of system access. If several of the options and/ or processes outlined in this document are not available, please contact your site administrator.
In this document:
- Content Requirements for Webfetch
- Types of Webfetch
- Leveraging the Webfetch Tags in a Mailing
- Content Change Verification
- Webfetch HTML Best Practices
Content Requirements
Please review the following requirements prior to using the Webfetch functionality:
- Webfetch only supports the HTTP and HTTPS protocols.
- The content retrieved via Webfetch must be in a text/plain or text/HTML format.
- The client must host the content on a public URL.
- The URL can NOT be a redirect.
- The URL can NOT be password protected, behind a firewall or on a secure server.
- Multipart messages require two Webfetch calls: one call for the text mailing and one for the HTML.
- Since PostUp processes the Webfetch content at the point of message assembly, the Preview and Show Message Checker options will only evaluate the mailing content that exists prior to pulling in the Webfetch content. On the other hand, PostUp will display the content captured through Webfetch when sending a test message or scheduling a mailing. Any tag/ velocity replacement or dynamic content will render based on the recipient attributes stored in PostUp.
- If PostUp fails to retrieve the content from the URL or the HTTP status returned is not in the 200 range, the mailing will fail. In the event that the mailing fails, PostUp will alert the user responsible for creating the mailing.
Types of Webfetch
Description |
Use the following mailing tag when pulling the same content for all recipients: [-STATIC_WEB_FETCH(URL)-] URL = Fully qualified URL that provides the content Example: [-STATIC_WEB_FETCH_(http://www.postup.com)-] Clients may embed the Static Webfetch call anywhere within the text or HTML body of the email message. PostUp will only fetch the content once, and not per recipient. |
Tag Replacement | Yes |
Script Evaluation | Yes |
Open Tracking | Yes |
Link Tracking | Yes |
Verify Webfetch Content |
Yes Check the box located under the Schedule tab, entitled Verify Webfetch content has changed since the previous mailing prior to sending, during the Send process. This option prevents recurring mailings from sending content that has not changed since the last send time. PostUp will only offer this option when a Webfetch tag is present in the message content. |
Description |
Use the following mailing tag when pulling the same content for all recipients: [-STATIC_AD_FETCH(URL)-] URL = Fully qualified URL that provides the content Example: [-STATIC_AD_FETCH_(http://www.postup.com)-] Static Ad Webfetch behaves the same way as the Static Webfetch, with the exception that any content — such as a banner ad — will be excluded from the content validation check used for recurring messages. Clients may embed the Static Ad Webfetch call anywhere within the text or HTML body of the email message. PostUp will only fetch the content once, and not per recipient. |
Tag Replacement | Yes |
Script Evaluation | Yes |
Open Tracking | Yes |
Link Tracking | Yes |
Verify Webfetch Content |
No |
Description |
Use the following mailing tag to pull content for the mailing’s subject line: [-STATIC_TITLE_WEB_FETCH(<URL>)-] URL = Fully qualified URL that provides the content Example: [-STATIC_TITLE_WEB_FETCH(http://www.postup.com)-] The Subject Line Webfetch returns the content of the <title> tag found at the specified web page. Clients can only embed the Subject Line Webfetch call in the subject line of the email message. Clients may access the subject line field under the Content tab, during the Send process. Clients may personalize the subject line by including mailing tags within the content. Example: <title>Welcome to our newsletter [-FIRSTNAME-]<title> If the Webfetch URL is accessible BUT the title tag does not exist, or the value of the title tag is blank, PostUp will leave the subject line blank. If the external URL page does not exist, PostUp will notate the error when validating the Content tab, during the Send process. |
Tag Replacement | Yes |
Script Evaluation | NA |
Open Tracking | NA |
Link Tracking | NA |
Verify Webfetch Content |
NA |
Description |
Example: [$dynamic_web_fetch("http://www.xyz.com/getcontent.asp?gender=[-_gender-]")] Dynamic content indicates that the retrieved content will be different for all or some of the mailing recipients. For example, the above example will display different content based on a subscriber’s gender. Clients may invoke the dynamic_web_fetch script function anywhere within the text or HTML body of the email message. Note: The $dynamic_web_fetch function actually behaves just like [-STATIC_WEB_FETCH(…)-] if there are no recip-level tags in the URL. |
Tag Replacement | Yes |
Script Evaluation | Yes |
Open Tracking | NA |
Link Tracking |
Yes (requires dynamic links) |
Verify Webfetch Content |
NA |
Description |
Example: $Web.fetch("http://www.xyz.com/getcontent.asp?gender=$_gender") Dynamic content indicates that the retrieved content will be different for all or some of the mailing recipients. For example, the webfetch call listed above will display different content based on a subscriber’s gender. Clients may embed the dynamic webfetch call anywhere within the text or HTML body of the email message. |
Tag Replacement | This feature exists prior to pulling the data from the dynamic pages. However, the pages themselves cannot utilize these features. Please contact your Integration Consultant or submit a request through the Client Support Site for more information. |
Script Evaluation | This feature exists prior to pulling the data from the dynamic pages. However, the pages themselves cannot utilize these features. Please contact your Integration Consultant or submit a request through the Client Support Site for more information. |
Open Tracking | Yes |
Link Tracking | No |
Verify Webfetch Content |
No |
Leveraging the Webfetch Tags in a Mailing
- Once logged in, click on the Send tab.
- Create or edit a mailing, per normal procedure.
- Complete the General and Targeting tabs.
- Click on the Content tab.
- Click on the General Tags section, located with the PostUp Asset Library.
- Place your cursor in the HTML or Text content field in location where you want the fetched content to appear.
- Double click on the selected Webfetch tag. The Tag Parameters popup window will appear.
- Enter the page URL that hosts the content into the URL field.
- [Optional] Enter the character encoding into the Optional Param field. If omitted, PostUp will assume UTF-8.
- Click Insert Tag. The tag will automatically appear in the content field.
Content Change Verification
The following option only applies to recurring mailings using the Static Webfetch functionality. To prevent recurring mailings from sending content that has not changed since the last send time, please review the steps outlined below.
- Once logged in, click on the Send tab.
- Create or edit a mailing per normal procedure.
- Click on the Recurring Schedule tab.
- Click on the "Verify webfetch content has changed since the previous mailing prior to sending" checkbox.
- Click on Apply Changes.
Note: Clients should use the Static Ad Fetch tag to exclude any content — such as a banner ad — from being included in the content validation check.
Webfetch HTML Best Practices
The majority of email clients support some standard of HTML and CSS; however, clients utilizing the Webfetch feature must remember that email does not render in the same manner as a webpage. When using the Webfetch feature, clients need to pull in content that is compatible with most email clients.
Please review the following recommendations in order to bypass any possible rendering issues.
- Embed Externally Linked CSS. Email clients, such as Hotmail and Yahoo, only preserve CSS if it exists inside the <body> tag of the message’s content. Typically, web pages include linked CSS in the <head> portion of the page.
- Please include the linked CSS file in the email content within a <style></style> block, inside the <body> tag, or as inline CSS in the actual HTML tags. Inline CSS is highly recommended since all email clients accept inline CSS, including Gmail.
- In addition, make sure the email is legible without CSS support. If possible, use normal HTML tags, such as <font> tags, to try and accomplish the same style. In general, utilizing normal HTML tags is a better HTML practice.
- Avoid Advanced CSS
- Avoid Background Images. Although web pages may render background images with ease, email clients such as Outlook 2007, Gmail and Hotmail will disable background images by default.
- Remove Absolute Positioning Properties. Absolute positioning is a form of CSS used for advanced layouts on web pages. Unfortunately, the majority of email clients do not support this form of CSS.
- Remove Float Property. A float property is another form of CSS commonly used for web page layouts. Again, email clients currently do not support this property.
- Minimize to Body Content. After removing any linked CSS and including it in the body of the email, remove the <head> portion of the content. The <head> portion typically includes linked CSS, JavaScript, title and meta tags- all either ignored by email clients or treated as malicious code.
- Use Absolute Links, Not Relative Links. Make sure each URL has a fully specified path. (For example: http://www.domain.com/images/filename.jpg instead of /imagesfilename.jpg) Remember that images that render on a webpage may not render in the body of an email.
- Remove Flash. Email clients will likely break or block any message containing Flash.
- Remove JavaScript. Email clients will likely break or block JavaScript. In fact, some email clients view JavaScript as a form of malicious code.
- Remove Google/ 3rd Party Tracking Code. Third party tracking code will not translate into the message.
- Avoid Forms. Due to their erratic behavior, avoid using forms in your email. Outlook 2007, specifically, does not support the <form> tag, in addition to <input> tags. If the mailing requires a form, use a form that does not require hidden parameters.
- Avoid Frames/ iFrame. Some web pages will use frames or iframe to display the content of one HTML page inside of another. Email clients typically do not support frames or iframe due to the security risks with spam and viruses.